package com.yuexinduo.mylibrary.base;

import android.content.Context;

public  class BasePresenter<V extends BaseView> implements InBasePresenter {
        protected final String TAG = this.getClass().getSimpleName();
        protected V mView;
        protected Context mContext;


        /**
         * 获取V层
         */
        public V getView() {
            return mView;
        }

        @Override
        public void setContext(Context context) {
            mContext = context;
        }

        /**
         * 绑定V层
         *
         * @param view V层
         */
        @Override
        public void onStart(BaseView view) {
            mView = (V) view;
        }

        /**
         * 解绑V层
         */
        @Override
        public void onDestroy() {
            mView = null;
        }
}
